<template>
    <h1>商品与用户</h1>
    <div class="totil">
        <span>商品总数量：{{ commoditynums }}</span>
        <span>用户总数量：{{ usernums }}</span>
    </div>
    <!-- <div id="myChart"></div> -->
</template>
  
<script setup lang="ts">
import {  ref } from 'vue'
import service from '../../../utils/service';

//获取商品总数量
const commoditynums = ref<number>()
const totlegoog = () => {
    service({
        url: "/statistic/product"
    }).then((res: any) => {
        if (res.data.code === "200") {
            commoditynums.value = res.data.data;
        }
    })
}
totlegoog()
//获取用户总数量
const usernums = ref<number>()
const totlePerson = () => {
    service({
        url: "/statistic/product"
    }).then((res: any) => {
        if (res.data.code === "200") {
            usernums.value = res.data.data;
        }
    })
}
totlePerson()
</script>

<style scoped>

</style>
  